﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;

namespace MapControl.Bing
{
    internal class BingMapProvider : IMapProvider, IDisposable
    {
        private ITilesManager tilesManager;

        #region IMapProvider Members

        public ITilesManager TilesManager
        {
            get { return tilesManager; }
        }

        #endregion

        public BingMapProvider(string apiKey, Map map)
        {
            this.tilesManager = new CommonTilesManager(map, new BingImageManager() { ApiKey = apiKey });
        }

        #region IDisposable Members

        public void Dispose()
        {
            if (tilesManager != null)
                tilesManager.Dispose();
        }

        #endregion
    }
}
